﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResourceEdit.aspx.cs" Inherits="Demo.Web.Catalogs.ResourceEdit" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<%@ Register Src="ResourceTecnology.ascx" TagName="WindowTecnology" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <link href="../Resources/css/styles.css" rel="stylesheet" type="text/css" />
    <title></title>
    <style type="text/css">
        .label
        {
            font: bold 11px tahoma,arial,sans-serif;
            width: 180px;
            height: 25px;
            padding: 5px 0;
            border: 1px dotted #99bbe8;
            color: #15428b;
            cursor: default;
            margin: 10px;
            background: #dfe8f6;
            text-align: center;
            margin-left: 0px;
        }
        .cbStates-list
        {
            width: 99%;
            font: 11px tahoma,arial,helvetica,sans-serif;
        }
        
        .cbStates-list th
        {
            font-weight: bold;
        }
        
        .cbStates-list td, .cbStates-list th
        {
            padding: 3px;
        }
        
        .list-item
        {
            cursor: pointer;
        }
    </style>
    <script type="text/javascript">
        var Clear = function () {
            var name = Ext.getCmp('txtName');
            name.setValue('');
            name.clearInvalid();
            var name = Ext.getCmp('txtLastName');
            name.setValue('');
            name.clearInvalid();
            var name = Ext.getCmp('txtSecondLastName');
            name.setValue('');
            name.clearInvalid();
            var name = Ext.getCmp('txtBirthDate');
            name.setValue('');
            name.clearInvalid();
            var name = Ext.getCmp('cboResourceType');
            name.setValue('');
            name.clearInvalid();
            var name = Ext.getCmp('txtPhoneNumber');
            name.setValue('');
            name.clearInvalid();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />
    <ext:Store ID="resourceTypeStore" runat="server">
        <Model>
            <ext:Model ID="Model" runat="server">
                <Fields>
                    <ext:ModelField Name="Id" />
                    <ext:ModelField Name="Description" />
                    <ext:ModelField Name="Cost" />
                </Fields>
            </ext:Model>
        </Model>
    </ext:Store>
    <ext:TabPanel ID="TabPanel1" runat="server" ActiveTabIndex="0" Border="true" DeferredRender="false"
        Layout="FitLayout">
        <Items>
            <ext:FormPanel ID="ResourceInfo" runat="server" Title="Informacion de Recurso" Icon="ChartOrganisation"
                DefaultAnchor="100%" BodyPadding="5">
                <Items>
                    <ext:TextField ID="txtResourceID" Visible="false" runat="server" FieldLabel="ID"
                        Disabled="true" Name="ID" />
                    <ext:TextField ID="txtName" runat="server" FieldLabel="Nombre" BlankText="Nombre es Requerido"
                        AllowBlank="false" MaxLength="200" />
                    <ext:TextField ID="txtLastName" MaxLength="200" runat="server" FieldLabel="Apellido Paterno" BlankText="Apellido Paterno es Requerido"
                        AllowBlank="false" />
                    <ext:TextField ID="txtSecondLastName" MaxLength="200" runat="server" FieldLabel="Apellido Materno"
                        BlankText="Apellido Materno es Requerido" AllowBlank="false" />
                    <ext:DateField ID="txtBirthDate" runat="server" FieldLabel="Fecha Nacimiento" BlankText="Fecha de Nacimiento es Requerida"
                        AllowBlank="false" />
                    <ext:ComboBox DisplayField="Description" ValueField="Id" ID="cboResourceType" BlankText="Tipo de Recurso es Requerido"
                        EmptyText="Seleccione" runat="server" FieldLabel="Tipo de Recurso" AllowBlank="false" />
                    <ext:TextField ID="txtPhoneNumber" MaxLength="20" runat="server" FieldLabel="Telefono" BlankText="Telefono es Requerido"
                        AllowBlank="false" />
                </Items>
                <Listeners>
                    <ValidityChange Handler="#{btnGuardar}.setDisabled(!valid);" />
                </Listeners>
            </ext:FormPanel>
        </Items>
        <TopBar>
            <ext:Toolbar ID="Toolbar1" runat="server">
                <LayoutConfig>
                    <ext:HBoxLayoutConfig Align="top" Pack="Start" />
                </LayoutConfig>
                <Items>
                    <ext:Button ID="btnAsign" runat="server" Text="Asignar Tecnologias" Icon="Add">
                        <DirectEvents>
                            <Click OnEvent="Asignar">
                                <EventMask ShowMask="true" />
                            </Click>
                        </DirectEvents>
                    </ext:Button>
                    <ext:ToolbarSeparator ID="ToolbarSeparator2" runat="server" />
                    <ext:Button ID="CancelButton" runat="server" Text="Limpiar" Icon="Decline">
                        <Listeners>
                            <Click Fn="Clear" />
                        </Listeners>
                    </ext:Button>
                    <ext:ToolbarSeparator ID="ToolbarSeparator1" runat="server" />
                    <ext:Button ID="btnGuardar" runat="server" Text="Guardar" Icon="Accept" Disabled="true">
                        <DirectEvents>
                            <Click OnEvent="Guardar">
                                <EventMask ShowMask="true" />
                            </Click>
                        </DirectEvents>
                    </ext:Button>
                </Items>
            </ext:Toolbar>
        </TopBar>
    </ext:TabPanel>
    <uc1:WindowTecnology ID="WindowTenology" runat="server" />
    </form>
</body>
</html>
